There are currently two programs available at SAIL for sorting text files. The more general program is SSORT; for details, READ SSORT. However, SSORT takes forever on large, randomly-ordered files. If you want to sort such a file, taking each line as a separate record, and do not mind having upper- and lower-case letters sort separately, you should use MSORT, documented via READ MSORT.